from pydantic import BaseModel, Field
from fastapi import Query

Audio = Query(
    ...,
    title="音频设置",
    description="打开或关闭音频",
    example='True'
)

Video = Query(
    ...,
    title="视频设置",
    description="打开或关闭视频",
    example='True'
)

Key = Query(
    ...,
    title="键盘按键",
    description="发送不同的按键",
    example="W|S|D|A",
    regex="^[WSDA]{1}$"
)


class GpsData(BaseModel):
    lit: float = Field(..., description="经度", example='126.729165')
    dim: float = Field(..., description='维度', example='26.594799')
    angle: float = Field(..., description='角度', example='127.54')


class BaseData(BaseModel):
    batValue: float = Field(..., description="电量", example='83')
    sigValue: int = Field(..., description="信号强度", example='3')
    speedValue: float = Field(..., description="速度大小", example='23.12')


class SystemInfoData(BaseModel):
    pass
